
#ifndef _MEMBER_BMAINWINDOW_H_
#define _MEMBER_BMAINWINDOW_H_

#include <queue>
#include <BTexture>
#include <BFont>
#include <BTimer>
#include <BClock>
#include <BImage>
#include <BDialog>
#include <BImage>
#include <BIcon>
#include <BDisplay>
#include <BMainWindow>

namespace BWE
{
	enum ResizeMode
	{
		Resize_None = int(0),

		Resize_Left,
		Resize_Top,
		Resize_Right,
		Resize_Bottom,

		Resize_Max
	};

	class member_BMainWindow
	{
	public:
		member_BMainWindow(BMainWindow* mainWindow);
		~member_BMainWindow();

		void freshRects();

	public:
		BMainWindow*	boss;

		BIconHolder		titleIcon;
		BSize			iconSize;
		Align			titleAlign;
		int				titleSpace;
		BSize			buttonSize;

		bool			dirty;
		bool			titleHovered;
		bool			closeHovered;
		bool			minHovered;
		bool			maxHovered;
		ResizeMode		mode;

		bool			pressed;
		BPoint			pressedPos;
		BRect			normalRect;

		BRect			iconRect;
		BRect			titleRect;
		BRect			textRect;
		BRect			closeRect;
		BRect			minRect;
		BRect			maxRect;
		BRect			borderTop;
		BRect			borderLeft;
		BRect			borderRight;
		BRect			borderBottom;

		BString			tr_title;
		BIconHolder		closeIcon;
		BIconHolder		minIcon;
		BIconHolder		maxIcon;
		BImageHolder	titleImage;
	};
}

#endif
